package com.example.service.webhook.business.fund.repository;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.example.service.webhook.business.fund.entity.LoanRepayRecordEntity;
import com.example.service.webhook.repository.base.BaseDAO;
import com.example.service.webhook.util.DateUtil;
/**
 * 公积金贷款信息
 * ClassName: EducationRepository    
 * date: 2016年7月26日 下午5:35:38   
 * @author yuandong  
 * @version   
 * @since JDK 1.6
 */
@Repository
public class LoanRepayRecordRepository extends BaseDAO<LoanRepayRecordEntity>{
	
	@Resource(name="templateFund")
    private JdbcTemplate jdbcTemplate;

    public JdbcTemplate getJdbcTemplate() {
		return jdbcTemplate;
	}
    
    public void saveLoanRepayRecordEntity(LoanRepayRecordEntity entity) throws Exception  {
    	entity.setCreateTime(DateUtil.getCurrentDate());
    	entity.setLastModifyTime(DateUtil.getCurrentDate());
		this.add(entity);
    }
    
    public void deleteLoanRepayRecordEntity(String userId,String customerNumber){
    	String sql = "delete from t_fund_loaninforepay where userId=? and customerNumber=?";
    	this.delete(sql, new Object[]{userId,customerNumber});
    }
    
  
    
}
